home *** CD-ROM | disk | FTP | other *** search
/ VRML 2.0 Sourcebook (2nd Edition) / VRML 2.0 Sourcebook CD [md5 fed90f4f9c39d5a60d477058775c7e21].iso / book / unix / ch16 / 16fig02.wrl < prev    next >
Text File  |  1996-09-22  |  1KB  |  59 lines

  1. #VRML V2.0 utf8
  2. # The VRML 2.0 Sourcebook
  3. # Copyright [1997] By
  4. # Andrea L. Ames, David R. Nadeau, and John L. Moreland
  5. Group {
  6.     children [
  7.     # Axes
  8.         Shape {
  9.             appearance Appearance {
  10.                 material Material {
  11.                     emissiveColor 1.0 1.0 1.0
  12.                     diffuseColor  1.0 1.0 1.0
  13.                 }
  14.             }
  15.             geometry IndexedLineSet {
  16.                 coord Coordinate {
  17.                     point [
  18.                         0.0 0.0 0.0, 10.0 0.0 0.0, 0.0 8.0 0.0
  19.                     ]
  20.                 }
  21.                 coordIndex [ 0, 1, -1,  0, 2, -1 ]
  22.             }
  23.         },
  24.     # Line plot with different color lines
  25.         Shape {
  26.             # no appearance, use emissive coloring
  27.             geometry IndexedLineSet {
  28.                 coord Coordinate {
  29.                     point [
  30.                     # Green line
  31.                         1.0 1.0 0.0,   2.0 4.0 0.0,
  32.                         3.0 5.0 0.0,   4.0 4.0 0.0,
  33.                         5.0 6.0 0.0,   6.0 7.0 0.0,
  34.                         7.0 5.0 0.0,   8.0 6.0 0.0,
  35.                         9.0 4.0 0.0,  10.0 3.0 0.0,
  36.                     # Yellow line
  37.                         1.0 3.0 0.0,   2.0 2.0 0.0,
  38.                         3.0 2.0 0.0,   4.0 1.0 0.0,
  39.                         5.0 2.0 0.0,   6.0 4.0 0.0,
  40.                         7.0 3.0 0.0,   8.0 5.0 0.0,
  41.                         9.0 5.0 0.0,  10.0 6.0 0.0,
  42.                     ]
  43.                 }
  44.                 coordIndex [
  45.                 # Green line
  46.                     0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1,
  47.                 # Yellow line
  48.                     10, 11, 12, 13, 14, 15, 16, 17, 18, 19, -1
  49.                 ]
  50.                 colorPerVertex FALSE
  51.                 color Color {
  52.                     color [ 0.0 1.0 0.0,   1.0 1.0 0.0 ]
  53.                 }
  54.                 colorIndex [ 0, 1 ]
  55.             }
  56.         }
  57.     ]
  58. }
  59.